<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%
    String path = request.getContextPath();
    String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort()
            + path + "/";
%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<base href="<%=basePath%>" />

<title>Index</title>
<jsp:include page="header.jsp"></jsp:include>

<style type="text/css">
.form-signin {
	max-width: 330px;
	margin: 0 auto;
}
</style>
</head>
<body>
	<jsp:include page="top.jsp"></jsp:include>
	<div class="container theme-showcase" role="main">
		<form action="reg" method="post" class="form-signin" role="form">
			<h2 class="form-signin-heading">用户注册</h2>
			<div class="form-group">
				<label> <s:if test="msg=='用户名重复'">
						<font color="red"><s:property value="msg" /></font>
					</s:if>
				</label> <input type="text" class="form-control" name="user.name"
					placeholder="用户名" />
			</div>
			<div class="form-group">
				<label> <s:if test="msg=='密码过短'">
						<font color="red"><s:property value="msg" /></font>
					</s:if>
				</label> <input type="password" class="form-control" name="newPassword1"
					placeholder="密码" />
			</div>
			<div class="form-group">
				<label> <s:if test="msg=='密码不一致'">
						<font color="red"><s:property value="msg" /></font>
					</s:if>
				</label> <input type="password" class="form-control" name="newPassword2"
					placeholder="确认密码" />
			</div>
			<button type="submit" class="btn btn-success">注册</button>
			<a href="login" class="btn btn-primary"> 登录 </a>
		</form>
	</div>
	<jsp:include page="footer.jsp"></jsp:include>
</body>
</html>
